package com.jd.jr.insights.dm.dim.controller;

import com.jd.jr.insights.dm.dim.service.OperationLogService;
import com.jd.jr.insights.dm.dim.service.impl.OperationLogServiceImpl;
import com.jfinal.core.Controller;

/**
 * Created by Administrator on 2017/9/3.
 */
public class OperationLogController extends Controller {

    OperationLogService operationLogService = new OperationLogServiceImpl();

    public void index() {
        render("/operationLog.html");
    }

    public void getAllListInPage() {

        int pageIndex = getParaToInt("page") == null ? 1 : getParaToInt("page");   //第几页的数据
        int pageSize = getParaToInt("rows") == null ? 20 : getParaToInt("rows");  //每页多少条数据
        int pageNum = getParaToInt("page") == null ? 1 : pageIndex;
        renderText(operationLogService.getOperationLogInPage(pageNum));
    }
}
